import request from "@/utils/request";
import { ParseData } from "@/utils/utils";

// 获取banner列表分页
export const GetBannerList = (data: any) => {
  return request({
    method: "GET",
    url: `/banner?${ParseData(data)}`,
  });
};
// banner上下架
export const ChangeBannerStatus = (data: any) => {
  return request({
    method: "PUT",
    url: `/banner/shangjia/${data.id}`,
  });
};
// banner删除
export const DeleteBanner = (data: any) => {
  return request({
    method: "DELETE",
    url: `/banner/${data.id}`,
  });
};
// banner新增
export const AddBanner = (data: any) => {
  return request({
    method: "POST",
    url: `/banner`,
    data,
  });
};
// banner编辑
export const EditBanner = (data: any) => {
  return request({
    method: "PUT",
    url: `/banner`,
    data,
  });
};
// banner信息
export const GetBanner = (data: any) => {
  return request({
    method: "GET",
    url: `/banner/${data.id}`,
  });
};


